package org.assertj.ohos.api.bluetooth;

import ohos.bluetooth.ble.GattService;
import org.assertj.core.api.AbstractAssert;
import java.util.UUID;
import static org.assertj.core.api.Assertions.assertThat;

public class BluetoothGattServiceAssert
    extends AbstractAssert<BluetoothGattServiceAssert, GattService> {
  public BluetoothGattServiceAssert(GattService actual) {
    super(actual, BluetoothGattServiceAssert.class);
  }

/* // TODO: wang, not found in ohos
  public BluetoothGattServiceAssert hasInstanceId(int id) {
    isNotNull();
    int actualId = actual.getInstanceId();
    assertThat(actualId) //
        .overridingErrorMessage("Expected instance ID <%s> but was <%s>", id, actualId) //
        .isEqualTo(id);
    return this;
  }

  public BluetoothGattServiceAssert hasType(@BluetoothGattServiceType int type) {
    isNotNull();
    int actualType = actual.getType();
    //noinspection ResourceType
    assertThat(actualType) //
        .overridingErrorMessage("Expected type <%s> but was <%s>.", typeToString(type),
            typeToString(actualType)) //
        .isEqualTo(type);
    return this;
  }
*/

  public BluetoothGattServiceAssert hasUuid(UUID uuid) {
    isNotNull();
    UUID actualUuid = actual.getUuid();
    assertThat(actualUuid) //
        .overridingErrorMessage("Expected UUID <%s> but was <%s>.", uuid, actualUuid) //
        .isEqualTo(uuid);
    return this;
  }

/* // TODO: wang, not found in ohos
  public static String typeToString(@BluetoothGattServiceType int type) {
    return buildNamedValueString(type) //
        .value(SERVICE_TYPE_PRIMARY, "primary")
        .value(SERVICE_TYPE_SECONDARY, "secondary")
        .get();
  }*/
}
